struct TreeNode* searchBST(struct TreeNode* root, int val) {
    if (root == NULL)
    {
        return NULL;
    }
    if (root->val == val)
    {
        return root;
    }
    struct TreeNode* left = searchBST(root->left, val);
    struct TreeNode* right = searchBST(root->right, val);
    if (left)
        return left;
    return right;
}